import type { PageParams } from "@/types/global";
import type { HotResultItem } from "@/types/hot";
import { http } from "@/untils/request";

type HotParams = PageParams & { subType?: string }

/**
 * 热门推荐-小程序
 * @param url 接口地址
 * @param data 请求参数 可选的
 * @returns 
 */
export const getHotlistAPI = (url: string, data?: HotParams) => {
    return http<HotResultItem>({
        url,
        method: 'GET',
        data
    })
}